//*****************************************************************************
//
// ABEC3 Lumped Element File
//
//*****************************************************************************

  // Common parameters of the driver
  Def_Const
    {  Reo=10;        fre=10e3;     ExpoRe=0.7;
       Leo=50e-6;     ExpoLe=0.6;
       Bl=10;
       Mms = 1.2e-3;  Rms = 1.7;    Cms = 33e-6;
       dD = 50e-3;           // Diameter 50mm
       SD = pi*sqr(dD/2);
       // Enclosure
       Vb = 0.3e-3;   // 0.3 liter
       Lb = 30e-3;    // Depth of enclosure
    }
    

  // Definition only used for the second System 'S2' for comparison
  Def_Driver  'Drv1'
    dD={dD}
    Re={Reo}   fre={fre}    ExpoRe={ExpoRe}
    Le={Leo}   ExpoLe={ExpoLe}
    Bl={Bl}
    Mms={Mms}  Rms={Rms}  Cms={Cms}

  Def_Speaker  'Sp1'
    dD={dD}
    Re={Reo}   fre={fre}    ExpoRe={ExpoRe}
    Le={Leo}   ExpoLe={ExpoLe}
    Bl={Bl}
    Mms={Mms}  Rms={Rms}  Cms={Cms}
    Vb={Vb}


  // S1 is a transducer, which is modeled with the help of individual elements
  System  'S1'

    // Voice-coil
    Impedance  'Ze'
      Node=1=2
      Z={ Re_f = Reo*(1.0 + f/fre)^ExpoRe;
          wLe = w*Leo;      hh = sqr(wLe/Reo);
          r = (ExpoLe*hh + 1.0)/(hh + 1.0);
          Le_f = wLe^r;
          Ze = Re_f + j*Le_f; }

    // Motor
    Gyrator 'G1'
      Node=2=0=3=4
      Bl={Bl}

    // Mechanical part.
    Impedance  'Zms'
      Node=3=5
      Z={ Zms = Rms + jw*Mms + 1/(jw*Cms) }

    // Rear side with enclosure
    Coupler  'SD_r'
      Node=4=0=8
      dD={dD}

    Enclosure  'Vb'
      Node=8
      Vb={Vb}    Lb={Lb}

    // Front side with radiation
    Coupler  'SD_f'
      Node=5=0=7
      dD={dD}

    // Radiation impedance of disc on Infinite Baffle
    RadImp 'RI1'
      Node=7
      dD={dD}


  // S2 models the transducer with the help of a compact component
  System 'S2'

    Driver  Def='Drv1'
      Node=1=0=7=8

    Enclosure  'E1'
      Node=8
      Vb={Vb}    Lb={Lb}

    // Radiation
    RadImp 'RI2'
      Node=7
      dD={dD}


  // S3 models the transducer with the help of another compact component
  System 'S3'

    Speaker  Def='Sp1'
      Node=1=0


